home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 75 / MOBICLIC 75.ISO / pc / DATA / TOUTEDIT / TOUT_MATOS.cst / 00009_Script_GESTION_ZONE_DEPOT_GOOD < prev    next >
Text File  |  2005-06-15  |  3KB  |  81 lines

  1. property pSprite, pSpriteNo,pMembername,pSpriteName
  2. property pPisteselect, prect,ptargetOK,ptargetKO,pFlagroll,pXmin,pYmin,pXmax,pYmax
  3. property pFlagbulle,pcodebulle,pcodeLOC,pFlagselect,pNopiece
  4. ----------------------------------
  5. on getPropertyDescriptionList(me)
  6.   L = [:]
  7.   L[#ptargetOK] = [#comment:"label cible si lΓcher OK",#format:#string,#default:EMPTY]
  8.   L[#ptargetKO] = [#comment:"label cible si lΓcher mauvais",#format:#string,#default:EMPTY]
  9.   L[#pFlagroll] = [#comment:"highlight au roll de la cible? ",#format:#boolean,#default:TRUE]
  10.   L[#pXmin] = [#comment:"dΘplacement:Xmin  ",#format:#integer,#default:0]
  11.   L[#pYmin] = [#comment:"dΘplacement:Ymin  ",#format:#integer,#default:0]
  12.   L[#pXmax] = [#comment:"dΘplacement:Xmax  ",#format:#integer,#default:640]
  13.   L[#pYmax] = [#comment:"dΘplacement:Ymax  ",#format:#integer,#default:480]
  14.   L[#pFlagbulle] = [#comment:"bulle au survol?",#format:#boolean,#default:FALSE]
  15.   L[#pcodebulle]= [#comment:"code info-bulle",#format:#string,#default:EMPTY]
  16.   L[#pcodeLOC]= [#comment:"code position bulle",#format:#string,#default:EMPTY]
  17.   
  18.   return L
  19. end
  20. ------------------------------------
  21. on beginsprite me
  22.   pSpriteNo = me.spriteNum
  23.   pSprite = _movie.sprite(pSpriteNo)
  24.   pMembername = pSprite.member.name
  25.   pSpriteName = pSprite.name
  26.   prect =  pSprite.rect
  27. end
  28. ----------------------------------- 
  29. on exitFrame me
  30.   case(pFlagselect) of
  31.     0:-- aucune piΦce n'est saisie
  32.       nothing
  33.     -1:-- la piΦce saisie vient d'Ωtre relΓchΘe
  34.       _player.cursor(-1)
  35.       zrect = sprite(pPisteselect).rect
  36.       if intersect(prect,zrect) = rect(0,0,0,0) then
  37.         _movie.puppetSprite(pPisteselect,FALSE)
  38.         pFlagselect = 0
  39.         if pFlagbulle then
  40.           bulle(0)
  41.         end if
  42.         _movie.go(ptargetKO)
  43.         exit
  44.       else
  45.         pFlagselect = 0
  46.         if pFlagbulle then
  47.           bulle(0)
  48.         end if
  49.         _movie.go(ptargetOK)
  50.         exit
  51.       end if
  52.     99:-- la piΦce saisie est prΩte α Ωtre bougΘe
  53.       _player.cursor(290)
  54.       sprite(pPisteselect).loc = point(min(pXmax,max(pXmin,the mouseH)),min(pYmax,max(pYmin,the mouseV)))
  55.       zrect = sprite(pPisteselect).rect
  56.       if pFlagroll then
  57.         if intersect(prect,zrect) <> rect(0,0,0,0) then
  58.           pSprite.member = "POINT_SURVOL"
  59.           if pFlagbulle then
  60.             bulle(pcodebulle,pcodeLOC,me,1,1,0)
  61.           end if
  62.         else
  63.           _movie.puppetSprite(pSpriteNo,FALSE)
  64.           if pFlagbulle then
  65.             bulle(0)
  66.           end if
  67.         end if
  68.       end if
  69.       _movie.updateStage()
  70.     otherwise:-- une piΦce vient d'Ωtre saisie, pFlagselect est le n░ de sa piste
  71.       pmemloc = sprite(pFlagselect).loc
  72.       pPisteselect = pFlagselect
  73.       pFlagselect = 99
  74.   end case
  75. end
  76. ---------------------------------
  77. on glidepo me, NoPISTE
  78.   pFlagselect = NoPISTE
  79. end
  80. --------------------------------
  81.